import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
const globSetting = useGlobSetting();
const baseUploadUrl = globSetting.uploadUrl;
enum Api {
  equipmentList = '/lims/equipment/list',
  materialList = '/lims/component/material/list',
  testList = '/lims/test/list',
}

/**
 * 上传父路径
 */
export const uploadUrl=`${baseUploadUrl}/sys/common/upload`;

/**
 * 文件上传
 */
export const uploadFile = (params,success)=>{
  return defHttp.uploadFile({url:uploadUrl}, params,{success})
}

/**
 * 仪器列表
 * @param params
 */
export const getEquipmentList = (params) => {
  return defHttp.get({ url: Api.equipmentList, params });
};

/**
 * 物料列表
 * @param params
 */
export const getMaterialList = (params) => {
  return defHttp.get({ url: Api.materialList, params });
};

/**
 * 检测项目列表
 * @param params
 */
export const getTestList = (params) => {
  return defHttp.get({ url: Api.testList, params });
};

